﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="List.ascx.cs" Inherits="eCommerce.CMS.CustomAdmin.Controls.Pages.List" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<h3>Manage Pages</h3>

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="4" ForeColor="#333333" GridLines="None" OnRowCreated="GridView1_RowCreated" CssClass="gridtable" OnRowDataBound="GridView1_RowDataBound" OnRowCommand="GridView1_RowCommand" Width="640px">
	<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
	<Columns>
		<asp:TemplateField HeaderText="&nbsp;">
			<ItemTemplate>
				<asp:ImageButton ID="PluseBT" runat="server" ImageUrl="~/App_Themes/CMS/graphics/plussm.png" Visible="False" Width="18px" CommandName="_Show" />
				<asp:ImageButton ID="MinBT" runat="server" ImageUrl="~/App_Themes/CMS/graphics/minsm.png" Width="18px" CommandName="_Hide" />
			</ItemTemplate>
		</asp:TemplateField>
		<asp:BoundField DataField="pageid" HeaderText="ID" />
		<asp:BoundField DataField="pageupid" HeaderText="Sub Page" />
		<asp:BoundField DataField="pagetitle" HeaderText="Title" />
		<asp:BoundField DataField="pagespecial" HeaderText="Page Url" />
		<asp:TemplateField >
			<ItemTemplate>
				<asp:ImageButton AlternateText="Edit Page" runat="server" ID="Button_edit" CssClass="btn" CommandName="EditCustomer" CommandArgument='<%# Eval("pageid")%>' OnCommand="Button_edit_Command" Width="18px" Height="20px" ImageUrl="~/App_Themes/CMS/graphics/pencil.png" />
			</ItemTemplate>
		</asp:TemplateField>
		<asp:TemplateField >
			<ItemTemplate>
				<asp:ImageButton runat="server" ID="Button_delete" Width="18px" ImageUrl="~/App_Themes/CMS/graphics/delsm.gif" CssClass="btn" CommandName="DeleteCustomer" CommandArgument='<%# Eval("pageid")%>' OnCommand="Button_delete_Command" />
                <cc1:ModalPopupExtender ID="mdlPopup" runat="server" TargetControlID="Button_delete" PopupControlID="pnlPopup" OkControlID="btnYes" BackgroundCssClass="modalBackground" />
                <asp:Panel ID="pnlPopup" runat="server" CssClass="confirm_dialog" style="display:none;" >
                <div class="popupinner">
                <p>Are you sure you want to delete this item?</p>
                <div class="popupbase">
                 <asp:Button ID="btnYes" Text="Yes" runat="server" />
                 <asp:Button ID="btnNo" Text="No" runat="server" OnClientClick="$find('mdlPopup').hide(); return false;" />
                 <asp:LinkButton ID="LinkButton1" runat="server" CssClass="popupclose" OnClientClick="$find('mdlPopup').hide(); return false;" />               </div>
                </div>
                </asp:Panel>
			</ItemTemplate>
		</asp:TemplateField>
        
	</Columns>
	<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
	<EditRowStyle BackColor="#D1D1D1" />
	<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
	<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
	<HeaderStyle BackColor="#58585A" Font-Bold="True" ForeColor="White" />
	<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
</asp:GridView>

